Nevron Open Vision Documentation
Nevron.Nov.DataStructures Namespace / NList<T> Class / BinarySearch Method / BinarySearch(T,IComparer<T>) Method
item to look for
comparer to use


In This Topic
    BinarySearch(T,IComparer<T>) Method
    In This Topic
    Searches for the index at which the item occurs by using a binary search. It is an user responsibility to first sort the list in ascending order.
    Syntax
    'Declaration
     
    
    Public Overloads Function BinarySearch( _
       ByVal item As T, _
       ByVal comparer As System.Collections.Generic.IComparer(Of T) _
    ) As System.Integer
    'Usage
     
    
    Dim instance As NList(Of T)
    Dim item As T
    Dim comparer As System.Collections.Generic.IComparer(Of T)
    Dim value As System.Integer
     
    value = instance.BinarySearch(item, comparer)
    public System.int BinarySearch( 
       T item,
       System.Collections.Generic.IComparer<T> comparer
    )

    Parameters

    item
    item to look for
    comparer
    comparer to use
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also